//public class Student {
//    public String name;
//    public int age;
//    public String gender;
//public Student(String name,int age,String gender){
//    this.name=name;
//    this.age=age;                           //对象的打印
//    this.gender=gender;
//}
//    public static void main(String[] args) {
//        Student stu=new Student("jim",18,"男");
//        System.out.println(stu);  //输出结果为：路径名@对象的hashcode
//    }                                     //即Student@4eec7777
//}
//这里说下如何快速修改类名
//鼠标光标放置在对话框（类名.java）那里，鼠标右键选中rename file...选项并点击，这时会弹出一个类名修改的对话框，直接在里面修改类名
//修改之后点击Refactor,这时类名就修改成功了

public class Student1 {
    public String name;
    public int age;
    public String gender;
    public Student1(String name,int age,String gender){
        this.name=name;
        this.age=age;
        this.gender=gender;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", gender='" + gender + '\'' +
                '}';
    }
                            //快捷方式生成toString()
           //1.鼠标右键  2.选中Generate点击  3.选中toString()并点击ok
    public static void main(String[] args) {
        Student1 stu=new Student1("jim",18,"男");
        System.out.println(stu);  //输出结果为：[jim,18,男]
    }
}
